package com.scott.po;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import java.util.HashSet;
import java.util.Set;

/**
 * 组织机构表
 * Created by Scott on 2017/3/22.
 */
@Entity
public class SysOrg extends BaseEntity {

    private String name;

    @OneToMany(cascade = { CascadeType.REFRESH,
            CascadeType.PERSIST,
            CascadeType.MERGE,
            CascadeType.REMOVE },
            mappedBy ="sysOrg")
    private Set<SysUser> sysUsers = new HashSet<>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<SysUser> getSysUsers() {
        return sysUsers;
    }

    public void setSysUsers(Set<SysUser> sysUsers) {
        this.sysUsers = sysUsers;
    }
}
